home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_joe.idb / usr / freeware / lib / joe / rjoerc.z / rjoerc
Encoding:
Text File  |  1999-01-26  |  16.0 KB  |  586 lines

  1.  
  2.                          Initialization file for JOE
  3.                             Restricted access Joe
  4.  
  5.  JOE looks for this file in:
  6.     1 - .joerc
  7.     2 - $HOME/.joerc
  8.     3 - /usr/local/lib/joerc
  9.  
  10.  This file can include other files by placing the following include command
  11.  in the first column:
  12.  
  13.  :include filename
  14.  
  15.  FIRST SECTION: Default global options (these options can also be specified
  16.  on the command line.  Also the NOXON, LINES, COLUMNS, DOPADDING and BAUD
  17.  options can be specified in environment variables):
  18.  
  19.  Put each option you want set in the first column:
  20.  
  21.  -option    Sets the option
  22.  --option    Clears the option
  23.  
  24.  -mid        Cursor is recentered when scrolling is necessary
  25.  
  26.  -marking    Text between ^KB and cursor is highlighted (use with -lightoff)
  27.  
  28.  -asis        Characters 128 - 255 shown as-is
  29.  
  30.  -force        Force final newline when files are saved
  31.  
  32.  -nobackups    If you don't want backup files to be created
  33.  
  34.  -lightoff    Turn off highlighting after block copy or move
  35.  
  36.  -exask        ^KX always confirms file name
  37.  
  38.  -beep        Beep on errors and when cursor goes past extremes
  39.  
  40.  -nosta        Disable top-most status line
  41.  
  42.  -keepup    %k and %c status line escape sequences updated frequently
  43.  
  44.  -pg nnn    No. lines to keep for PgUp/PgDn
  45.  
  46.  -csmode    ^KF after a pervious search does a ^L instead
  47.  
  48.  -backpath path Directory to store backup files
  49.  
  50.  -nonotice    Disable copyright notice
  51.  
  52.  -noxon        Attempt to turn off ^S/^Q processing
  53.  
  54.  -orphan    Put extra files given on command line in orphaned buffers
  55.         instead of in windows
  56.  
  57.  -dopadding    Output pad characters (for when there is no tty handshaking)
  58.  
  59.  -lines nnn    Set no. screen lines
  60.  
  61.  -baud nnn    Set baud rate for terminal optimizations
  62.  
  63.  -columns nnn    Set no. screen columns
  64.  
  65.  -help        Start with help on
  66.  
  67.  -skiptop nnn    Don't use top nnn lines of the screen
  68.  
  69.  Status line definition strings.  -lmsg defines the left-justified string and
  70.  -rmsg defines the right-justified string.  The first character of -rmsg is
  71.  the background fill character.  The following escape sequences can be used
  72.  in these strings:
  73.  
  74.   %t  12 hour time
  75.   %u  24 hour time
  76.   %T  O for overtype mode, I for insert mode
  77.   %W  W if wordwrap is enabled
  78.   %I  A if autoindent is enabled
  79.   %X  Rectangle mode indicator
  80.   %n  File name
  81.   %m  '(Modified)' if file has been changed
  82.   %*  '*' if file has been changed
  83.   %R  Read-only indicator
  84.   %r  Row (line) number
  85.   %c  Column number
  86.   %o  Byte offset into file
  87.   %O  Byte offset into file in hex
  88.   %a  Ascii value of character under cursor
  89.   %A  Ascii value of character under cursor in hex
  90.   %p  Percent of file cursor is at
  91.   %l  No. lines in file
  92.   %k  Entered prefix keys
  93.   %S  '*SHELL*' if there is a shell running in window
  94.   %M  Macro recording message
  95.  
  96.  These formatting escape sequences may also be given:
  97.  
  98.   \i  Inverse
  99.   \u  Underline
  100.   \b  Bold
  101.   \d  Dim
  102.   \f  Blink
  103.  
  104. -lmsg \i%k%T%W%I%X %n %m%R %M
  105. -rmsg  %S Row %r Col %c %t  Ctrl-K H for help
  106.  
  107.  SECOND SECTION: File name dependant local option settings:
  108.  
  109.  Each line with '*' in the first column indicates the modes which should be
  110.  set for files which match the regular expression.  If more than one regular
  111.  expression matches the file name, then the last matching one is chosen.
  112.  
  113.  Here are the modes which can be set:
  114.  
  115.     -wordwrap        Wordwrap
  116.  
  117.     -autoindent        Auto indent
  118.  
  119.     -overwrite        Overtype mode
  120.  
  121.     -lmargin nnn        Left margin
  122.  
  123.     -rmargin nnn        Right margin
  124.  
  125.     -tab nnn        Tab width
  126.  
  127.     -indentc nnn        Indentation character (32 for space, 9 for tab)
  128.  
  129.     -istep nnn        Number of indentation columns
  130.  
  131.     -french            One space after '.', '?' and '!' for wordwrap
  132.                 and paragraph reformat instead of two.  Joe
  133.                 does not change the spacing you give, but
  134.                 sometimes it must put spacing in itself.  This
  135.                 selects how much is inserted.
  136.  
  137.     -spaces            TAB inserts spaces instead of tabs.
  138.  
  139.     -linums            Enable line numbers on each line
  140.  
  141.     -rdonly            File is read-only
  142.  
  143.     -keymap name        Keymap to use if not 'main'
  144.  
  145.     -lmsg            Status line definition strings-
  146.     -rmsg            see previous section for more info.
  147.  
  148.     -mnew macro        Macro to execute when new files are loaded
  149.     -mold macro        Macro to execute when existing files are loaded
  150.     -msnew macro        Macro to execute when new files are saved
  151.     -msold macro        Macro to execute when existing files are saved
  152.  
  153.     Macros for the above options are in the same format as in the key
  154.     binding section below- but without the key name strings.
  155.  
  156. *
  157. -wordwrap
  158.  
  159. *.c
  160. -mnew rtn,"/* This is a C file */",rtn
  161. -autoindent
  162.  
  163. *.h
  164. -autoindent
  165.  
  166. *akefile
  167. *AKEFILE
  168. *rc
  169.  
  170. *.p
  171. -autoindent
  172.  
  173.  THIRD SECTION: Named help screens:
  174.  
  175.  Use \i to turn on/off inverse video
  176.  Use \u to turn on/off underline
  177.  Use \b to turn on/off bold
  178.  Use \d to turn on/off dim
  179.  Use \f to turn on/off flash
  180.  
  181. {Basic
  182. \i   Help Screen    turn off with ^KH    more help with ESC . (^[.)              \i
  183. \i \i\uCURSOR\u           \uGO TO\u            \uBLOCK\u      \uDELETE\u   \uMISC\u         \uEXIT\u      \i \i
  184. \i \i^B left ^F right ^U  prev. screen ^KB begin  ^D char. ^KJ reformat ^KX save  \i \i
  185. \i \i^P up   ^N down  ^V  next screen  ^KK end    ^Y line  ^T  options  ^C  abort \i \i
  186. \i \i^Z previous word ^A  beg. of line ^KM move   ^W >word ^R  refresh            \i \i
  187. \i \i^X next word     ^E  end of line  ^KC copy   ^O word< ^@  insert   \uFILE\u      \i \i
  188. \i \i\uSEARCH\u           ^KU top of file  ^KY delete ^J >line \uSPELL\u        ^KD save  \i \i
  189. \i \i^KF find text    ^KV end of file             ^_ undo  ^[N word               \i \i
  190. \i \i^L  find next    ^KL to line No.             ^^ redo  ^[L file               \i \i
  191. }
  192.  
  193. {Windows
  194. \i   Help Screen    turn off with ^KH    prev. screen ^[,    next screen ^[.     \i
  195. \i \i^KO Split the window in half                                                 \i \i
  196. \i \i^KG Make current window bigger         ^KT Make current window smaller       \i \i
  197. \i \i^KN Go to the window below             ^KP Go to the window above            \i \i
  198. \i \i^C  Eliminate the current window       ^KI Show all windows / Show one window\i \i
  199. }
  200.  
  201. {Advanced
  202. \i   Help Screen    turn off with ^KH    prev. screen ^[,    next screen ^[.     \i
  203. \i \i\uMACROS\u         \uMISC\u            \uSCROLL\u                \uGOTO\u       \uI-SEARCH\u     \i \i
  204. \i \i^K[ 0-9 Record ^K SPACE status ^[W Up                ^[B To ^KB ^[R Backwards\i \i
  205. \i \i^K]     Stop   ^K\\ Repeat      ^[Z Down              ^[K To ^KK ^[S Forwards \i \i
  206. \i \i^K 0-9  Play   ^[M Math        ^K< Left  \uQUOTE\u       \uDELETE\u     \uBOOKMARKS\u    \i \i
  207. \i \i^K?     Query  ^KA Center line ^K> Right `  Ctrl-    ^[Y yank   ^[ 0-9 Goto  \i \i
  208. \i \i^[D     Dump   ^[H Message               ^\\ Meta-    ^[O line<  ^[^[   Set   \i \i
  209. }
  210.  
  211. {Programs
  212. \i   Help Screen    turn off with ^KH    prev. screen ^[,    next screen ^[.     \i
  213. \i \i\uGOTO\u                 \uINDENT\u                                                  \i \i
  214. \i \i^G  Matching ( [ {   ^K, less                                                \i \i
  215. \i \i^K- Previous place   ^K. more                                                \i \i
  216. \i \i^K= Next place                                                               \i \i
  217. \i \i                                                                             \i \i
  218. }
  219.  
  220. {Search
  221. \i   Help Screen    turn off with ^KH    prev. screen ^[,    next screen ^[.     \i
  222. \i \iSpecial search sequences:                                                    \i \i
  223. \i \i    \\^  \\$  matches beg./end of line     \\?     match any single char        \i \i
  224. \i \i    \\<  \\>  matches beg./end of word     \\*     match 0 or more chars        \i \i
  225. \i \i    \\c     matches balanced C expression \\\\     matches a \\                  \i \i
  226. \i \i    \\[..]  matches one of a set          \\n     matches a newline            \i \i
  227. \i \i    \\+     matches 0 or more of the character which follows the \\+           \i \i
  228. \i \iSpecial replace sequences:                                                   \i \i
  229. \i \i    \\&     replaced with text which matched search string                    \i \i
  230. \i \i    \\0 - 9 replaced with text which matched Nth \\*, \\?, \\c, \\+, or \\[..]     \i \i
  231. \i \i    \\\\     replaced with \\               \\n     replaced with newline        \i \i
  232. }
  233.  
  234. {Joe
  235. \i   Help Screen    turn off with ^KH    prev. screen ^[,                        \i
  236. \i \i Send bug reports to: Joe Allen (jhallen@world.std.com)                      \i \i
  237. }
  238.  
  239.  FOURTH SECTION: Key bindings:
  240.  
  241.  Section names you must provide:
  242.  
  243.     :main        For editing window
  244.     :prompt        For prompt lines
  245.     :query        For single-character query lines
  246.     :querya        Singe-character query for quote
  247.     :querysr    Search & Replace single-character query
  248.  
  249.  Other sections may be given as well for organization purposes or for
  250.  use with the '-keymap' option.
  251.  
  252.  Use:
  253.  :inherit name        To copy the named section into the current one
  254.  :delete key        To delete a key sequence from the current section
  255.  
  256.  Keys:
  257.  
  258.  Use ^@ through ^_ and ^? for Ctrl chars
  259.  Use SP for space
  260.  Use a TO b to generate a range of characters
  261.  
  262.  You can also use termcap string capability names.  For example:
  263.  
  264.     .ku        Up
  265.     .kd        Down
  266.     .kl        Left
  267.     .kr        Right
  268.     .kh        Home
  269.     .kH        End
  270.     .kI        Insert
  271.     .kD        Delete
  272.     .kP        PgUp
  273.     .kN        PgDn
  274.     .k1 - .k9    F1 - F9
  275.     .k0        F0 or F10
  276.     .k;        F10
  277.  
  278.  Macros:
  279.  
  280.  Simple macros can be made by comma seperating 2 or more command names.  For
  281.  example:
  282.  
  283.  bof,bol    ^T Z        Goto beginning of last line
  284.  
  285.  Also quoted matter is typed in literally:
  286.  
  287.  bol,">",dnarw    .k1        Quote news article line
  288.  
  289.  Macros may cross lines if they end with ,
  290.  
  291. :windows        Bindings common to all windows
  292. type        ^@ TO          Type a character
  293. abort        ^C        Abort window
  294. abort        ^K Q
  295. abort        ^K ^Q
  296. abort        ^K q
  297. arg        ^K \        Repeat next command
  298. explode        ^K I        Show all windows or show only one window
  299. explode        ^K ^I
  300. explode        ^K i
  301. help        ^K H        Help menu
  302. help        ^K ^H
  303. help        ^K h
  304. hnext        ^[ .        Next help window
  305. hprev        ^[ ,        Previous help window
  306. math        ^[ m        Calculator
  307. math        ^[ M        Calculator
  308. math        ^[ ^M        Calculator
  309. msg        ^[ h        Display a message
  310. msg        ^[ H        Display a message
  311. msg        ^[ ^H        Display a message
  312. nextw        ^K N        Goto next window
  313. nextw        ^K ^N
  314. nextw        ^K n
  315. pgdn        .kN        Screen down
  316. pgdn        ^V
  317. pgdn        ^[ [ 6 ~
  318. pgup        .kP        Screen up
  319. pgup        ^U
  320. pgup        ^[ [ 5 ~
  321. play        ^K 0 TO 9    Execute macro
  322. prevw        ^K P        Goto previous window
  323. prevw        ^K ^P
  324. prevw        ^K p
  325. query        ^K ?        Macro query insert
  326. record        ^K [        Record a macro
  327. retype        ^R        Refresh screen
  328. rtn        ^M        Return
  329.  shell        ^K Z        Shell escape
  330.  shell        ^K ^Z
  331.  shell        ^K z
  332. stop        ^K ]        Stop recording
  333.  
  334. :main            Text editing window
  335. :inherit windows
  336.  
  337.  Spell-check macros
  338.  
  339. :def spellfile filt,"cat >ispell.tmp;ispell ispell.tmp </dev/tty >/dev/tty;cat ispell.tmp;/bin/rm ispell.tmp",rtn,retype
  340. :def spellword psh,nextword,markk,prevword,markb,filt,"cat >ispell.tmp;ispell ispell.tmp </dev/tty >/dev/tty;tr -d <ispell.tmp '\\012';/bin/rm ispell.tmp",rtn,retype,nextword
  341. spellword    ^[ n
  342. spellfile    ^[ l
  343.  
  344.  Extra functions not really part of JOE user interface:
  345.  
  346. delbol        ^[ o        Delete to beginning of line
  347. delbol        ^[ ^O        Delete to beginning of line
  348. dnslide        ^[ z        Scroll down one line
  349. dnslide        ^[ Z        Scroll down one line
  350. dnslide        ^[ ^Z        Scroll down one line
  351.  edit,rtn,filt,
  352.  query,parserr    ^[ c        Compile
  353.  edit,rtn,filt,
  354.  query,parserr    ^[ ^C        Compile
  355.  execmd        ^[ x        Prompt for command to execute
  356.  execmd        ^[ X        Prompt for command to execute
  357.  execmd        ^[ ^X        Prompt for command to execute
  358. isrch        ^[ s        Forward incremental search
  359. isrch        ^[ S        Forward incremental search
  360. isrch        ^[ ^S        Forward incremental search
  361. notmod        ^[ ~        Not modified
  362.  nxterr        ^[ =        To next error
  363. parserr        ^[ e        Parse errors in current buffer
  364. parserr        ^[ E        Parse errors in current buffer
  365. parserr        ^[ ^E        Parse errors in current buffer
  366.  prverr        ^[ -        To previous error
  367. rsrch        ^[ r        Backward incremental search
  368. rsrch        ^[ R        Backward incremental search
  369. rsrch        ^[ ^R        Backward incremental search
  370.  run        ^[ !        Run a program in a window
  371. tomarkb        ^[ b        Go to beginning of marked block
  372. tomarkb        ^[ ^B        Go to beginning of marked block
  373. tomarkk        ^[ k        Go to end of marked block
  374. tomarkk        ^[ ^K        Go to end of marked block
  375. tomarkk        ^[ K        Go to end of marked block
  376. txt        ^[ i        Prompt for text and insert it
  377. txt        ^[ ^I        Prompt for text and insert it
  378. txt        ^[ I        Prompt for text and insert it
  379. upslide        ^[ w        Scroll up one line
  380. upslide        ^[ ^W        Scroll up one line
  381. upslide        ^[ W        Scroll up one line
  382. yankpop        ^[ y        Undelete text
  383. yankpop        ^[ ^Y        Undelete text
  384. yankpop        ^[ Y        Undelete text
  385.  
  386.  bufed        ^[ d        Menu of buffers
  387.  pbuf        ^[ .        Next buffer
  388.  nbuf        ^[ ,        Prev buffer
  389.  query        ^[ q        Quoted insert
  390.  byte        ^[ n        Goto byte
  391.  col        ^[ c        Goto column
  392.  abortbuf    ^[ k        Kill current buffer- don't mess with windows
  393.   ask        ^[ a        Ask to save current buffer
  394.  bop        ^[ p        Backwards paragraph
  395.  bos        ^[ x        Bottom of screen
  396.  copy        ^[ ^W        Copy block into yank
  397.  dupw        ^[ \        Split window
  398.  eop        ^[ n        Forwards paragraph
  399.  format        ^[ j        Format paragraph ignore block
  400.  markl        ^[ l        Mark line
  401.  nmark        ^[ @        Turn off ^KB ^KK
  402.  pop        ^[ >        Pop ^KB ^KK
  403.  psh        ^[ <        Push ^KB ^KK
  404.  swap        ^[ x        Swap ^KB and cursor
  405.  tomarkbk    ^[ g        Switch between beginning and end of marked
  406.  tos        ^[ e        Top of screen
  407.  tw0        ^[ 0        Kill current window (orphans buffer)
  408.  tw1        ^[ 1        Kill all other windows (orphans buffers)
  409.  uarg        ^[ u        Universal argument
  410.  yank        ^[ ^Y        Undelete previous text
  411.  yapp        ^[ w        Append next delete to previous yank
  412.  
  413.  Standard JOE user interface
  414.  
  415. quote8        ^\        Enter Meta chars
  416. quote        `        Enter Ctrl chars
  417.  
  418. backs        ^?        Backspace
  419. backs        ^H
  420. backw        ^O        Backspace word
  421.  bknd        ^K '        Shell window
  422. blkcpy        ^K C        Copy marked block
  423. blkcpy        ^K ^C
  424. blkcpy        ^K c
  425. blkdel        ^K Y        Delete marked block
  426. blkdel        ^K ^Y
  427. blkdel        ^K y
  428. blkmove        ^K M        Move marked block
  429. blkmove        ^K ^M
  430. blkmove        ^K m
  431.  blksave        ^K W        Save marked block
  432.  blksave        ^K ^W
  433.  blksave        ^K w
  434. bof        ^K U        Goto beginning of file
  435. bof        ^K ^U
  436. bof        ^K u
  437. bol        .kh        Goto beginning of line
  438. bol        ^A
  439. center        ^K A        Center line
  440. center        ^K ^A
  441. center        ^K a
  442. crawll        ^K <        Pan left
  443. crawlr        ^K >        Pan right
  444. delch        .kD        Delete character
  445. delch        ^D
  446. deleol        ^J        Delete to end of line
  447. dellin        ^Y        Delete entire line
  448. delw        ^W        Delete word to right
  449. dnarw        .kd        Go down
  450. dnarw        ^N
  451. dnarw        ^[ O B
  452. dnarw        ^[ [ B
  453.  edit        ^K E        Edit a file
  454.  edit        ^K ^E
  455.  edit        ^K e
  456. eof        ^K V        Go to end of file
  457. eof        ^K ^V
  458. eof        ^K v
  459. eol        .kH        Go to end of line
  460. eol        ^E
  461. exsave        ^K X        Save and exit
  462. exsave        ^K ^X
  463. exsave        ^K x
  464. ffirst        ^K F        Find first
  465. ffirst        ^K ^F
  466. ffirst        ^K f
  467.  filt        ^K /        Filter block
  468. fnext        ^L        Find next
  469. fmtblk        ^K J        Format paragraphs in block
  470. fmtblk        ^K ^J
  471. fmtblk        ^K j
  472. gomark        ^[ 0 TO 9    Goto bookmark
  473. groww        ^K G        Grow window
  474. groww        ^K ^G
  475. groww        ^K g
  476. insc        .kI        Insert a space
  477.  insc        ^@
  478.  insf        ^K R        Insert a file
  479.  insf        ^K ^R
  480.  insf        ^K r
  481. lindent        ^K ,        Indent to left
  482. line        ^K L        Goto line no.
  483. line        ^K ^L
  484. line        ^K l
  485. ltarw        .kl        Go left
  486. ltarw        ^B
  487. ltarw        ^[ O D
  488. ltarw        ^[ [ D
  489. macros        ^[ d        Dump keyboard macros
  490. macros        ^[ ^D
  491. markb        ^K B        Set beginning of marked block
  492. markb        ^K ^B
  493. markb        ^K b
  494. markk        ^K K        Set end of marked block
  495. markk        ^K ^K
  496. markk        ^K k
  497. mode        ^T        Options menu
  498. nextpos        ^K =        Goto next position in position history
  499. nextword    ^X        Goto next word
  500. open        ^]        Split line
  501. prevpos        ^K -        Previous position in history
  502. prevword    ^Z        Previous word
  503. redo        ^^        Redo changes
  504. rindent        ^K .        Indent to right
  505. rtarw        .kr        Go right
  506. rtarw        ^F
  507. rtarw        ^[ O C
  508. rtarw        ^[ [ C
  509. ask        ^K D        Save file- no prompt
  510. ask        ^K S
  511. ask        ^K ^D
  512. ask        ^K ^S
  513. ask        ^K d
  514. ask        ^K s
  515.  save        ^K D        Save file
  516.  save        ^K S
  517.  save        ^K ^D
  518.  save        ^K ^S
  519.  save        ^K d
  520.  save        ^K s
  521. setmark        ^[ ^[        Set bookmark
  522. shrinkw        ^K T        Shrink window
  523. shrinkw        ^K ^T
  524. shrinkw        ^K t
  525. splitw        ^K O        Split window
  526. splitw        ^K ^O
  527. splitw        ^K o
  528. stat        ^K SP        Show status
  529.  tag        ^K ;        Tags file search
  530. tomatch        ^G        Goto matching parenthasis
  531. undo        ^_        Undo changes
  532. uparw        .ku        Go up
  533. uparw        ^P
  534. uparw        ^[ O A
  535. uparw        ^[ [ A
  536.  
  537. :prompt            Prompt windows
  538. :inherit main
  539. complete    ^I
  540.  
  541. :menu            Selection menus
  542. :inherit windows
  543. abort        ^[ ^[
  544. backsmenu    ^?
  545. backsmenu    ^H
  546. bofmenu        ^K U
  547. bofmenu        ^K ^U
  548. bofmenu        ^K u
  549. bolmenu        .kh
  550. bolmenu        ^A
  551. dnarwmenu    .kd
  552. dnarwmenu    ^N
  553. dnarwmenu    ^[ [ B
  554. dnarwmenu    ^[ O B
  555. eofmenu        ^K V
  556. eofmenu        ^K ^V
  557. eofmenu        ^K v
  558. eolmenu        .kH
  559. eolmenu        ^E
  560. ltarwmenu    .kl
  561. ltarwmenu    ^B
  562. ltarwmenu    ^[ [ D
  563. ltarwmenu    ^[ O D
  564. rtarwmenu    .kr
  565. rtarwmenu    ^F
  566. rtarwmenu    ^[ [ C
  567. rtarwmenu    ^[ O C
  568. rtn        SP
  569. rtn        ^I
  570. rtn        ^K H
  571. rtn        ^K h
  572. rtn        ^K ^H
  573. uparwmenu    .ku
  574. uparwmenu    ^P
  575. uparwmenu    ^[ [ A
  576. uparwmenu    ^[ O A
  577.  
  578. :query            Single-key query window
  579. :inherit windows
  580.  
  581. :querya            Single-key query window for quoting
  582. type        ^@ TO  
  583.  
  584. :querysr        Search & replace query window
  585. type        ^@ TO  
  586.